package com.example.mall.mapper;


import com.example.mall.pojo.SpOrder;
import com.example.mall.pojo.SpOrderGoods;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import java.util.List;

@Mapper
public interface SpOrderGoodsMapper {


//    select * from sp_order_goods a INNER JOIN sp_order b where a.order_id=b.order_id
    @Select("select * from sp_order_goods a inner join sp_order b where a.order_id=b.#{order_id}")
    List<SpOrderGoods> selectSpOrderGoods(Integer order_id);
    
    
    @Select("select * from sp_order_goods where order_id=#order_id;")
    List<SpOrderGoods> selectSpOrderGoodsByOrderId(Integer order_id);






}
